package loan.calc.exception;

import java.util.Objects;

public class CalcualatorException extends BizException{

    public static void requireNonNull(Object obj, String errorMessage) {
        if (Objects.isNull(obj)) {
            throw new CalcualatorException(errorMessage);
        }
    }

    public static void isTrue(Boolean expression, String errorMessage) {
        if (!expression) {
            throw new CalcualatorException(errorMessage);
        }
    }

    public CalcualatorException(String message, Object... args) {
        super(message, args);
    }

}
